package com.shan.design.visitor;

/**
 * description
 * 全职员工类：具体元素类
 *
 * @author shanzheng <br/>
 * @date 14:43 2018/11/29.<br/>
 * Modified By <br/>
 */

public class FulltimeEmployee implements Employee {

    private String name;
    private double weeklyWage;
    private int workTime;

    public FulltimeEmployee(String name, double weeklyWage, int workTime) {
        this.name = name;
        this.weeklyWage = weeklyWage;
        this.workTime = workTime;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getWeeklyWage() {
        return weeklyWage;
    }

    public void setWeeklyWage(double weeklyWage) {
        this.weeklyWage = weeklyWage;
    }

    public int getWorkTime() {
        return workTime;
    }

    public void setWorkTime(int workTime) {
        this.workTime = workTime;
    }

    @Override
    public void accept(Department department) {
        // 调用访问者的访问方法
        department.visit(this);
    }
}
